Skip to content

Preserve mesh UVs and diffuse texture references - #283

Merged
mahach666 merged 1 commit into
mainfrom
codex/issue-93-textures
Nov 20, 2026
Merged

mahach666 merged 1 commit into
mainfrom
codex/issue-93-textures

Conversation

@mahach666

Copy link
Copy Markdown
Collaborator

Closes #93.

  • Decode raw and quantised U/V palettes and their render-vertex maps. Preserve UVs independently of the position map and support zero-width constant axes.
  • Read the explicitly connected Generic diffuse image from inline and shared appearance assets. Resolve the path through XRef, preserving remapped paths and keeping otherwise identical materials with different images distinct.
  • Emit OBJ vt records, indexed faces and map_Kd. Emit GLB TEXCOORD_0, images, textures and baseColorTexture with the glTF upper-left origin. Both formats reference local image paths. GLB references PNG and JPEG files.
  • Update the format notes, public API docs and CHANGELOG.

Acceptance

  • OBJ and MTL advertise flat materials accurately and now document external diffuse textures.
  • Path-based OBJ output retains mtllib, usemtl, Kd and d from Write Wavefront materials alongside OBJ files #281.
  • Raw and packed UV tests cover palette indirection and unequal bit widths across packed words.
  • In-memory native containers exercise inline and shared appearances, XRef remapping, and both exporters. The GLB test checks binary UV values, material assignment and URI escaping.
  • A control NWD saved in Navisworks 2027 with an explicitly assigned PNG opened with two meshes and eight UVs using BuildSceneTree=false. Both exports referenced the actual PNG from XRef. The control file's logical hierarchy uses an existing unsupported header variant. No source binary fixture is committed.

Release tests passed on .NET 8 and .NET 10 (1,512 passed and 12 fixture tests skipped per target). The native-only build, formatting and git diff checks passed. Embedded image payloads and other material channels are outside the diffuse-reference scope.

@mahach666
mahach666 merged commit 396772d into main Nov 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OBJ export writes no materials (.mtl) despite CHANGELOG claim; no texture/UV support in OBJ or GLB

1 participant